/*工程基础信息后台*/
'use strict';
const engInformationQueryAction = require('../actions/engInformation/engInformationQueryAction');
const engInformationUpdateAction = require('../actions/engInformation/engInformationUpdateAction');

module.exports = async function (ctx) {
    let param = ctx.method === 'GET' ? ctx.query : ctx.request.fields;
    let action_type = param.action_type;
    try {
        switch (action_type) {
            case 'engInformationQuery': // 工程基础信息查询
                ctx.body = await engInformationQueryAction(param);
                break;
            case 'engInformationUpdate': // 工程基础信息修改
                ctx.body = await engInformationUpdateAction(param);
                break;
        }
    } catch (e) {
        ctx.body = {success: false, message: e.message};
    }

};